using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class GetMFriendResponse : GeneratedMessageLite<GetMFriendResponse, GetMFriendResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<GetMFriendResponse, GetMFriendResponse.Builder>
		{
			private bool resultIsReadOnly;
			private GetMFriendResponse result;
			protected override GetMFriendResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override GetMFriendResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override GetMFriendResponse DefaultInstanceForType
			{
				get
				{
					return GetMFriendResponse.DefaultInstance;
				}
			}
			public BaseResponse BaseResponse
			{
				get
				{
					return this.result.BaseResponse;
				}
				set
				{
					this.SetBaseResponse(value);
				}
			}
			public int Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<MFriend> FriendListList
			{
				get
				{
					return this.PrepareBuilder().friendList_;
				}
			}
			public int FriendListCount
			{
				get
				{
					return this.result.FriendListCount;
				}
			}
			public string MD5
			{
				get
				{
					return this.result.MD5;
				}
				set
				{
					this.SetMD5(value);
				}
			}
			public Builder()
			{
				this.result = GetMFriendResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(GetMFriendResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private GetMFriendResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					GetMFriendResponse other = this.result;
					this.result = new GetMFriendResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override GetMFriendResponse.Builder Clear()
			{
				this.result = GetMFriendResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override GetMFriendResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new GetMFriendResponse.Builder(this.result);
				}
				return new GetMFriendResponse.Builder().MergeFrom(this.result);
			}
			public override GetMFriendResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override GetMFriendResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is GetMFriendResponse)
				{
					return this.MergeFrom((GetMFriendResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override GetMFriendResponse.Builder MergeFrom(GetMFriendResponse other)
			{
				return this;
			}
			public override GetMFriendResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override GetMFriendResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(GetMFriendResponse._getMFriendResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = GetMFriendResponse._getMFriendResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseResponse.Builder builder = BaseResponse.CreateBuilder();
							if (this.result.hasBaseResponse)
							{
								builder.MergeFrom(this.BaseResponse);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseResponse = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasCount = input.ReadInt32(ref this.result.count_);
							continue;
						}
						if (num3 == 26u)
						{
							input.ReadMessageArray<MFriend>(num, text, this.result.friendList_, MFriend.DefaultInstance, extensionRegistry);
							continue;
						}
						if (num3 == 34u)
						{
							this.result.hasMD5 = input.ReadString(ref this.result.mD5_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public GetMFriendResponse.Builder SetBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = value;
				return this;
			}
			public GetMFriendResponse.Builder SetBaseResponse(BaseResponse.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseResponse = true;
				this.result.baseResponse_ = builderForValue.Build();
				return this;
			}
			public GetMFriendResponse.Builder MergeBaseResponse(BaseResponse value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseResponse && this.result.baseResponse_ != BaseResponse.DefaultInstance)
				{
					this.result.baseResponse_ = BaseResponse.CreateBuilder(this.result.baseResponse_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseResponse_ = value;
				}
				this.result.hasBaseResponse = true;
				return this;
			}
			public GetMFriendResponse.Builder ClearBaseResponse()
			{
				this.PrepareBuilder();
				this.result.hasBaseResponse = false;
				this.result.baseResponse_ = null;
				return this;
			}
			public GetMFriendResponse.Builder SetCount(int value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public GetMFriendResponse.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0;
				return this;
			}
			public MFriend GetFriendList(int index)
			{
				return this.result.GetFriendList(index);
			}
			public GetMFriendResponse.Builder SetFriendList(int index, MFriend value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.friendList_[index] = value;
				return this;
			}
			public GetMFriendResponse.Builder SetFriendList(int index, MFriend.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.friendList_[index] = builderForValue.Build();
				return this;
			}
			public GetMFriendResponse.Builder AddFriendList(MFriend value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.friendList_.Add(value);
				return this;
			}
			public GetMFriendResponse.Builder AddFriendList(MFriend.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.friendList_.Add(builderForValue.Build());
				return this;
			}
			public GetMFriendResponse.Builder AddRangeFriendList(IEnumerable<MFriend> values)
			{
				this.PrepareBuilder();
				this.result.friendList_.Add(values);
				return this;
			}
			public GetMFriendResponse.Builder ClearFriendList()
			{
				this.PrepareBuilder();
				this.result.friendList_.Clear();
				return this;
			}
			public GetMFriendResponse.Builder SetMD5(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasMD5 = true;
				this.result.mD5_ = value;
				return this;
			}
			public GetMFriendResponse.Builder ClearMD5()
			{
				this.PrepareBuilder();
				this.result.hasMD5 = false;
				this.result.mD5_ = "";
				return this;
			}
		}
		public const int BaseResponseFieldNumber = 1;
		public const int CountFieldNumber = 2;
		public const int FriendListFieldNumber = 3;
		public const int MD5FieldNumber = 4;
		private static readonly GetMFriendResponse defaultInstance;
		private static readonly string[] _getMFriendResponseFieldNames;
		private static readonly uint[] _getMFriendResponseFieldTags;
		private bool hasBaseResponse;
		private BaseResponse baseResponse_;
		private bool hasCount;
		private int count_;
		private PopsicleList<MFriend> friendList_ = new PopsicleList<MFriend>();
		private bool hasMD5;
		private string mD5_ = "";
		private int memoizedSerializedSize = -1;
		public static GetMFriendResponse DefaultInstance
		{
			get
			{
				return GetMFriendResponse.defaultInstance;
			}
		}
		public override GetMFriendResponse DefaultInstanceForType
		{
			get
			{
				return GetMFriendResponse.DefaultInstance;
			}
		}
		protected override GetMFriendResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseResponse BaseResponse
		{
			get
			{
				return this.baseResponse_ ?? BaseResponse.DefaultInstance;
			}
		}
		public int Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<MFriend> FriendListList
		{
			get
			{
				return this.friendList_;
			}
		}
		public int FriendListCount
		{
			get
			{
				return this.friendList_.Count;
			}
		}
		public string MD5
		{
			get
			{
				return this.mD5_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasBaseResponse)
				{
					return false;
				}
				if (!this.hasCount)
				{
					return false;
				}
				if (!this.BaseResponse.IsInitialized)
				{
					return false;
				}
				bool result;
				using (IEnumerator<MFriend> enumerator = this.FriendListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						MFriend current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseResponse)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseResponse);
				}
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.Count);
				}
				using (IEnumerator<MFriend> enumerator = this.FriendListList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						MFriend current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(3, current);
					}
				}
				if (this.hasMD5)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.MD5);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private GetMFriendResponse()
		{
		}
		public MFriend GetFriendList(int index)
		{
			return this.friendList_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] getMFriendResponseFieldNames = GetMFriendResponse._getMFriendResponseFieldNames;
			if (this.hasBaseResponse)
			{
				output.WriteMessage(1, getMFriendResponseFieldNames[0], this.BaseResponse);
			}
			if (this.hasCount)
			{
				output.WriteInt32(2, getMFriendResponseFieldNames[1], this.Count);
			}
			if (this.friendList_.Count > 0)
			{
				output.WriteMessageArray<MFriend>(3, getMFriendResponseFieldNames[2], this.friendList_);
			}
			if (this.hasMD5)
			{
				output.WriteString(4, getMFriendResponseFieldNames[3], this.MD5);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseResponse)
			{
				num ^= this.baseResponse_.GetHashCode();
			}
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<MFriend> enumerator = this.friendList_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					MFriend current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			if (this.hasMD5)
			{
				num ^= this.mD5_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			GetMFriendResponse getMFriendResponse = object_0 as GetMFriendResponse;
			if (getMFriendResponse == null)
			{
				return false;
			}
			if (this.hasBaseResponse != getMFriendResponse.hasBaseResponse || (this.hasBaseResponse && !this.baseResponse_.Equals(getMFriendResponse.baseResponse_)))
			{
				return false;
			}
			if (this.hasCount != getMFriendResponse.hasCount || (this.hasCount && !this.count_.Equals(getMFriendResponse.count_)))
			{
				return false;
			}
			if (this.friendList_.Count != getMFriendResponse.friendList_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.friendList_.Count; i++)
			{
				if (!this.friendList_[i].Equals(getMFriendResponse.friendList_[i]))
				{
					return false;
				}
			}
			return this.hasMD5 == getMFriendResponse.hasMD5 && (!this.hasMD5 || this.mD5_.Equals(getMFriendResponse.mD5_));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<GetMFriendResponse, GetMFriendResponse.Builder>.PrintField("BaseResponse", this.hasBaseResponse, this.baseResponse_, writer);
			GeneratedMessageLite<GetMFriendResponse, GetMFriendResponse.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<GetMFriendResponse, GetMFriendResponse.Builder>.PrintField<MFriend>("FriendList", this.friendList_, writer);
			GeneratedMessageLite<GetMFriendResponse, GetMFriendResponse.Builder>.PrintField("MD5", this.hasMD5, this.mD5_, writer);
		}
		public static GetMFriendResponse ParseFrom(byte[] data)
		{
			return GetMFriendResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private GetMFriendResponse MakeReadOnly()
		{
			this.friendList_.MakeReadOnly();
			return this;
		}
		public static GetMFriendResponse.Builder CreateBuilder()
		{
			return new GetMFriendResponse.Builder();
		}
		public override GetMFriendResponse.Builder ToBuilder()
		{
			return GetMFriendResponse.CreateBuilder(this);
		}
		public override GetMFriendResponse.Builder CreateBuilderForType()
		{
			return new GetMFriendResponse.Builder();
		}
		public static GetMFriendResponse.Builder CreateBuilder(GetMFriendResponse prototype)
		{
			return new GetMFriendResponse.Builder(prototype);
		}
		static GetMFriendResponse()
		{
			GetMFriendResponse.defaultInstance = new GetMFriendResponse().MakeReadOnly();
			GetMFriendResponse._getMFriendResponseFieldNames = new string[]
			{
				"BaseResponse",
				"Count",
				"FriendList",
				"MD5"
			};
			GetMFriendResponse._getMFriendResponseFieldTags = new uint[]
			{
				10u,
				16u,
				26u,
				34u
			};
			object.ReferenceEquals(micromsg.Proto.GetMFriendResponse.Descriptor, null);
		}
	}
}
